﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

public class PlayerEventNode : TutorialEventNode
{
    [JsonAttribute("evnm", "事件名称")]
    public PlayerEventDefine eventName = PlayerEventDefine.Player_Enter_World;

    [JsonAttribute("arg1", "事件参数1")]
    public string arg1;

    [JsonAttribute("arg2", "事件参数2")]
    public string arg2;

    [JsonAttribute("arg3", "事件参数3")]
    public string arg3;

    [JsonAttribute("arg4", "事件参数4")]
    public string arg4;

    BasePlayerEventHandle handle;

    protected override void Cancel()
    {
        handle.DeInit();
    }

    protected override void Init()
    {
        handle = PlayerEventFactory.GetEventHandle(eventName, OnEventCallBack, null, 1, arg1, arg2, arg3, arg4);
    }

    private void OnEventCallBack(EventHandleData obj)
    {
        Shoot(0);
    }
}

